<template>
	<view class="appraisalResult">
		<view class="item">
			<text>鉴定品类：</text>
			<text>{{pageData.category_name}}</text> 
		</view>
		<view class="item">
			<text>购买渠道：</text>
			<text>{{pageData.buy_channel_name}}</text> 
		</view>
		<view class="item-img">
			<text>上传图片：</text>
			<view class="imgs">
				<image :src="item" mode="" v-for="(item,index) in pageData.authen_pic" :key="index" @click="onLook(index)"></image>
			</view>
		</view>
		<view class="item-txt">
			<text>物品描述：</text>
			<text>{{pageData.description}}</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id:0,
				pageData:''
			};
		},
		onLoad(option) {
			this.id = option.id
			this.getPageData()
		},
		methods:{
			// 查看图片
			onLook(index){
				console.log(index)
				uni.previewImage({
					count:index,
					urls:this.pageData.authen_pic
				})
			},
			// 请求页面数据
			getPageData(){
				uni.request({
				    url:this.$Url +'/index.php/app/Authentication/fetchAuthenReportDetail',
				    method:'POST',
				    data:{
				       authentication_id:this.id
				    },
				    header:{
				        "token":uni.getStorageSync('token')
				    },
				    success: (res) => {
						if (res.data.status == 200) {
							this.pageData = res.data.data
						} else{
							uni.showToast({
								title:res.data.msg,
								icon:'none',
								duration:1200
							})
						}
				    }
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
.appraisalResult{
	width: 100vw;
	min-height: 100vh;
	background-color: #f7f7f7;
	.item{
		display: flex;
		align-items: center;
		background-color: #fff;
		padding: 30upx;
		margin-bottom: 10upx;
		text:first-child{
			color: #333;
			font-size: 34upx;
		}
		text:last-child{
			color: $zhuti-color;
			font-size: 34upx;
		}
	}
	.item-img{
		background-color: #fff;
		padding: 30upx;
		margin-bottom: 10upx;
		text{
			color: #333;
			font-size: 34upx;
		}
		.imgs{
			display: flex;
			align-items: center;
			image{
				width: 210upx;
				height: 230upx;
				margin-right: 20upx;
				margin-top: 30upx;
			}
		}
	}
	.item-txt{
		padding: 30upx;
		display: flex;
		flex-direction: column;
		background-color: #fff;
		text:first-child{
			color: #333;
			font-size: 34upx;
		}
		text:last-child{
			color: #999;
			font-size: 30upx;
		}
	}
}
</style>
